import { Body, Controller, Post } from '@nestjs/common'
import { InStoreService } from './in-store.service'

@Controller('inStore')
export class InStoreController {
  constructor(private readonly inStoreService: InStoreService) { }

  @Post('add')
  add(@Body() body) {
    return this.inStoreService.add(body)
  }

  @Post('del')
  del(@Body() body) {
    return this.inStoreService.del(body.id as number)
  }

  @Post('edit')
  edit(@Body() body) {
    return this.inStoreService.update(body)
  }

  @Post('page')
  page(@Body() body) {
    return this.inStoreService.getPageList(body)
  }

  @Post('getAssetDetail')
  getAssetDetail(@Body() body) {
    return this.inStoreService.getAssetDetail(body.id)
  }
}
